﻿using System;
using Abs.Core.DAL.EntityFramework;
using Abs.Core.Models.Blog;

namespace Abs.Core.DAL.SetUpDatabase
{
    internal partial class AbsInitializer
    {
        internal void InitializePost(AbsContext absContext)
        {
            var post = new Post
                       {
                           CategoryId = (int) CategoryEnum.School,
                           UserEmail = "sheldon.cooper@abs.com",
                           Title = "Great News!!!",
                           ContentMessage =
                               @"What make our site more compelling is because we keep adding new feature. Where is it? Where is the new feature? Here... you are seeing it now. It's called blogging. You can share any information or even have discussions about the school. Just only about school? Yes, only for now... I can create a new category if you can suggest a new one. Now, you might wondering how to do it. As for now, you can do it either by commenting below or send me an email to sheldon.cooper@abs.com. Enjoy!!! :)",
                           StatusId = (int) StatusEnum.Approved,
                           Date = DateTime.Now
                       };
            absContext.Posts.Add(post);
            absContext.SaveChanges();
        }//end of internal void InitializePost(AbsContext absContext)
    }//end of internal partial class AbsInitializer
}//end of namespace ABS.DAL.SetUpDatabase